package com.register.controller;
import com.register.pojo.Register;
import com.register.service.RegisterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController("registerController")
public class RegisterController {
    @Autowired
    private RegisterService registerService;
    @RequestMapping("/j")
    public Object deleteRegister(@RequestBody Register register){
        int list = registerService.deleteRegister(register.getId());
        return list;
    }
    @RequestMapping("/k")
    public Object addRegister(@RequestBody Register register){
        int list = registerService.addRegister(register);
        return list;
    }
}
